package com.mowh.gof23.behavioral.patterns.observer;

/**
 * @author mowh1gd
 * @create 2023/10/26 10:01
 */
public class Main {
    public static void main(String[] args) {
        NumberGenerator generator = new RandomNumberGenerator();
        Observer digitObserver = new DigitObserver();
        Observer graphObserver = new GraphObserver();
        generator.addObserver(digitObserver);
        generator.addObserver(graphObserver);
        generator.execute();

        System.out.println("remove digitObserver: ");
        generator.deleteObserver(digitObserver);
        generator.execute();
    }
}
